/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.FAQs;
import com.aptech.session.FAQsFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author DucMinh
 */
@ManagedBean
@RequestScoped
public class Searchfaqbean {
    @EJB
    private FAQsFacadeLocal fAQsFacade;

    /** Creates a new instance of Searchfaqbean */
    public Searchfaqbean() {
    }
    private String field;
    private Object value;
    private List<FAQs>listfaq;

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public List<FAQs> getListfaq() {
        return listfaq;
    }

    public void setListfaq(List<FAQs> listfaq) {
        this.listfaq = listfaq;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    public String searchfaq()
    {
        listfaq=fAQsFacade.searchFAQ(field, value);
        return "ResultFAQ";
    }
}
 